Namespace B1AddonBase
    Public Class AddonEvent
        Private _BeforeEvent As Boolean = False
        Private _ActionSuccess As Boolean = False
        Private _BubbleEvent As Boolean = True

        Private _FormType As String
        Private _FormUID As String
        Private _ItemUID As String
        Private _Row As Integer
        Private _ColUID As String
        Private _MenuUID As String
        Private _ObjectUID As String
        Private _FatherFormType As String
        Private _FatherFormUID As String

        Private _EventSign As String = "UserEvent"
        Private _BaseEventType As B1AddonBase.EnumBaseEventType
        'Private _EventType As SAPboAddon.B1AddonBase.EnumBaseEventType
        Private _Msg As String
        Private _parameter As B1AddonBase.AddonEventParameter


        Sub New()

        End Sub

        Sub New(ByVal sEventSign As String, ByVal sFormType As String, ByVal sFormUID As String, ByVal sObjectUID As String)
            Me._EventSign = sEventSign
            Me._FormType = sFormType
            Me._FormUID = sFormUID
            Me._ObjectUID = sObjectUID
        End Sub

        Sub New(ByVal sEventSign As String, ByVal sMenuUID As String, ByVal sObjectUID As String)
            Me._EventSign = sEventSign
            Me._MenuUID = sMenuUID
            Me._ObjectUID = sObjectUID
        End Sub

        Sub New(ByVal sEventSign As String, ByVal btBaseEvent As EnumBaseEventType)
            Me._EventSign = sEventSign
            Me._BaseEventType = btBaseEvent
        End Sub

        Sub New(ByVal btBaseEvent As EnumBaseEventType)
            If _EventSign = "UserEvent" Then Me._EventSign = btBaseEvent.ToString
            Me._BaseEventType = btBaseEvent
        End Sub

        Public Property Parameter() As B1AddonBase.AddonEventParameter
            Get
                Return _parameter
            End Get
            Set(ByVal value As B1AddonBase.AddonEventParameter)
                _parameter = value
            End Set
        End Property

        Public Property Message() As String
            Get
                Return _Msg
            End Get
            Set(ByVal value As String)
                _Msg = value
            End Set
        End Property

        Public Property BeforeEvent() As Boolean
            Get
                Return _BeforeEvent
            End Get
            Set(ByVal value As Boolean)
                _BeforeEvent = value
            End Set
        End Property

        Public Property ActionSucess() As Boolean
            Get
                Return _ActionSuccess
            End Get
            Set(ByVal value As Boolean)
                _ActionSuccess = value
            End Set
        End Property

        'Public Property BubbleEvent() As Boolean
        '    Get
        '        Return _BubbleEvent
        '    End Get
        '    Set(ByVal value As Boolean)
        '        _BubbleEvent = value
        '    End Set
        'End Property

        Public Property FormType() As String
            Get
                Return _FormType
            End Get
            Set(ByVal value As String)
                _FormType = value
            End Set
        End Property

        Public Property FormUID() As String
            Get
                Return _FormUID
            End Get
            Set(ByVal value As String)
                _FormUID = value
            End Set
        End Property

        Public Property ItemUID() As String
            Get
                Return _ItemUID
            End Get
            Set(ByVal value As String)
                _ItemUID = value
            End Set
        End Property

        Public Property ItemCol() As String
            Get
                Return _ColUID
            End Get
            Set(ByVal value As String)
                _ColUID = value
            End Set
        End Property

        Public Property ItemRow() As Integer
            Get
                Return _Row
            End Get
            Set(ByVal value As Integer)
                _Row = value
            End Set
        End Property

        Public Property MenuUID() As String
            Get
                Return _MenuUID
            End Get
            Set(ByVal value As String)
                _MenuUID = value
            End Set
        End Property

        Public Property ObjectUID() As String
            Get
                Return _ObjectUID
            End Get
            Set(ByVal value As String)
                _ObjectUID = value
            End Set
        End Property

        Public Property EventSign() As String
            Get
                Return _EventSign
            End Get
            Set(ByVal value As String)
                _EventSign = value
            End Set
        End Property

        Public Property BaseEventType() As SAPBoAddon.B1AddonBase.EnumBaseEventType
            Get
                Return _BaseEventType
            End Get
            Set(ByVal value As SAPBoAddon.B1AddonBase.EnumBaseEventType)
                _BaseEventType = value
                If _EventSign = "UserEvent" Then
                    _EventSign = value.ToString
                End If
            End Set
        End Property

        Public Property FatherFormType() As String
            Get
                Return _FatherFormType
            End Get
            Set(ByVal value As String)
                _FatherFormType = value
            End Set
        End Property

        Public Property FatherFormUID() As String
            Get
                Return _FatherFormUID
            End Get
            Set(ByVal value As String)
                _FatherFormUID = value
            End Set
        End Property

        'Public Property EventType() As SAPboAddon.B1AddonBase.EnumBaseEventType
        '    Get
        '        Return _EventType
        '    End Get
        '    Set(ByVal value As SAPboAddon.B1AddonBase.EnumBaseEventType)
        '        _EventType = value
        '    End Set
        'End Property

    End Class
End Namespace